CC=gcc
CXX=g++

CFLAGS=-w -O2 -DLINUX -Iamx -pipe -fvisibility=hidden -fPIC -m32
CXXFLAGS=$(CFLAGS) -std=c++0x

.PHONY: all clean

OBJECTS=amx/amxdbg.o amx/amxaux.o amx/amx.o amxdbgw.o \
        amxnamefinder.o amxstacktrace.o crashdetector.o jump.o\
        logprintf.o plugin.o\
        settings.o fileutils.o

OUTFILE=crashdetect.so

all: $(OUTFILE) 

$(OUTFILE): $(OBJECTS)
	$(CXX) -shared -static-libstdc++ -s -m32 $^ -o $@
	
clean:
	rm -vf $(OBJECTS) $(OUTFILE)	
